#include "WProgram.h"
void setup();
void loop();
char incomingByte;


void setup(){
 for(int i=4;i<14;i++){
    pinMode(i,OUTPUT);
 }
 Serial.begin(9600);
}

void loop(){
   digitalWrite(13,HIGH);
   if (Serial.available() > 0) {

     incomingByte = Serial.read();
     
     //Serial.print("I received: ");
     Serial.print(incomingByte);
     //Serial.println(" ")

       
   
   }else{
     for(int i=4;i<14;i++){
       digitalWrite(i,HIGH);
       delay(500);
       digitalWrite(i,LOW);
     }
   }
   
   

}

int main(void)
{
	init();

	setup();
    
	for (;;)
		loop();
        
	return 0;
}

